<?php
#删除购物车的商品
session_start();
$id = $_GET['id'];
$car = $_SESSION['car'];
foreach($car as $key){
    if($key['id'] == $id){
        unset($car[$id]);
        break;
    }
}
$_SESSION['car'] = $car;
header("location:shoppingCar.php");